package com.foruo.learn.designmode.factory.abstractfactory;

public class TestMe {
    public static void main(String[] args){

        //获取红色工厂对象
        AbstractFactory factoryRed = new RedFactory();
        //红色工厂生产红色连衣裙
        Dress dress = factoryRed.getDress();
        //获取红色连衣裙价格
        System.out.println(dress.getPrice());

        //获取黑色工厂对象
        AbstractFactory factoryBlack = new BlackFactory();
        //工厂生产黑色连衣裙
        dress = factoryBlack.getDress();
        //获取黑色连衣裙价格
        System.out.println(dress.getPrice());
    }
}
